1.配置数据库
配置文件在，其中有例子
D:\code\php_laravel\demo1\config\database.php
创建测试数据库
CREATE DATABASE `forge` /*!40100 COLLATE 'utf8mb4_unicode_ci' */;
创建测试数据表
CREATE TABLE `student` (
	`Id` INT(11) NOT NULL AUTO_INCREMENT,
	`Name` VARCHAR(255) NULL DEFAULT '',
	PRIMARY KEY (`Id`)
)
COMMENT='student'
COLLATE='utf8mb4_unicode_ci'
ENGINE=InnoDB
;


2.添加数据
$name = $request->input("std_name");
Db::insert('insert into student (name) value (?)', [$name]);

3.更新数据
$id = 1;
$name = "updated";
Db::update('update student set name = ? WHERE id = ?',[$name,$id]);

4.删除数据
DB::delete('delete from student where id = ?', [$id]);